package com.znf4.controller.good;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.znf4.entity.ApiCommonResultVo;
import com.znf4.good.crops.entity.Crops;
import com.znf4.good.crops.server.CropsServer;

/**
 * 商城商品模块
 */
@Controller
@RequestMapping("/good/crops")
public class CropsGoodController {
	
	private static final Logger LOG = LoggerFactory.getLogger(CropsGoodController.class);
	
	@Autowired
	private CropsServer cropsServer ;
	

	
	/**
	 * 函数功能说明 ： 获取所有商城商品
	 *
	 * @参数： @return @return String @throws
	 */
	@RequestMapping(value = "/queryAll", method = { RequestMethod.POST, RequestMethod.GET })
	public ApiCommonResultVo queryAll(Crops crops ) {
		LOG.info("商户获取所有商品");
		List<Crops> list = cropsServer.queryAll(crops);
		return  new ApiCommonResultVo(0 , "" , list ) ; 
	}
	
	
	
	
	
	
	
	
	
	
	
	
	

}
